<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript" src="<%=path%>/resource/js/jquery-1.7.2.js"></script>
	<script type="text/javascript" src="<%=path%>/resource/js/jquery.upload.js"></script>
	<script type="text/javascript">
	function ccc(){  
		$.post("<%=path%>/front/test2.htm",function(data){
			alert(data);
		});
	}
		function aa(){
			$.post("<%=path%>/admin/serverInfo.htm",function(data){
		  	    console.log(data);
		  	});
		}
		
		function test(){
			$("#file1").trigger("click");
		}
		 $(function() {
		        $('#file1').change(function() {
		            $(this).upload("<%=path%>/admin/emp/photoupload.htm", function(data) {
		               $("#headimg").attr("src","<%=path%>"+data);
		            }, 'html');
		        });
		    });
	</script>
  </head>
  
  <body>
    This is my JSP page. <br>
    <a href="<%=path%>/front.htm">跳转</a>
    <a href="<%=path%>/blog/index.htm">博客</a>
    <a href="<%=path%>/front/test.htm">跳转2</a>
    <a href="javascript:;" onclick="ccc()">跳转2</a>
    <a href="<%=path%>/front/test2.htm">跳转2</a>
    <a href="<%=path%>/admin.htm">跳转2</a>
    <a href="<%=path%>/admin/desktop.htm">跳转3</a>
    <button onclick="aa()">fds</button>
    /home/ehome/abc.exe
    
    <div style="width:235px;height:320px">
    	<img id="headimg" src="<%=path%>/resource/images/noavatar_big.gif" />
    	<input name="file" id="file1" type="file" style="display: none;">
    	<input type="button" value="选择" onclick="test()">
    	<input type="button" value="确定">
    </div>
  </body>
</html>
